package com.sumover.POJO;

import java.io.Serializable;

public class Game implements Serializable {
    private Integer gid;

    private String gamename;

    private String gamecover;

    private String shortdetail;

    private static final long serialVersionUID = 1L;

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getGamename() {
        return gamename;
    }

    public void setGamename(String gamename) {
        this.gamename = gamename == null ? null : gamename.trim();
    }

    public String getGamecover() {
        return gamecover;
    }

    public void setGamecover(String gamecover) {
        this.gamecover = gamecover == null ? null : gamecover.trim();
    }

    public String getShortdetail() {
        return shortdetail;
    }

    public void setShortdetail(String shortdetail) {
        this.shortdetail = shortdetail == null ? null : shortdetail.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Game other = (Game) that;
        return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
                && (this.getGamename() == null ? other.getGamename() == null : this.getGamename().equals(other.getGamename()))
                && (this.getGamecover() == null ? other.getGamecover() == null : this.getGamecover().equals(other.getGamecover()))
                && (this.getShortdetail() == null ? other.getShortdetail() == null : this.getShortdetail().equals(other.getShortdetail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getGamename() == null) ? 0 : getGamename().hashCode());
        result = prime * result + ((getGamecover() == null) ? 0 : getGamecover().hashCode());
        result = prime * result + ((getShortdetail() == null) ? 0 : getShortdetail().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gid=").append(gid);
        sb.append(", gamename=").append(gamename);
        sb.append(", gamecover=").append(gamecover);
        sb.append(", shortdetail=").append(shortdetail);
        sb.append("]");
        return sb.toString();
    }
}